package com.rabbitmq.consumer;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
@RabbitListener(queues = "zelin")
public class DirectListener {

    @RabbitHandler
    public void getMessage(String Message){
        System.out.println("接收到的信息"+Message);
    }
}
